package com.cskaoyan.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;

/**
 * @author stone
 * @date 2022/01/04 15:49
 */
@RestController
public class FileController {

    @Value("${file.path}")
    String path;

    @RequestMapping("file/upload")
    public String fileUpload(/*MultipartFile file*/) {
        /*try {
            file.transferTo(new File(path,file.getOriginalFilename()));
        } catch (IOException e) {
            e.printStackTrace();
        }*/
        return "OK";
    }
}
